<template>
<el-drawer title="详情" :visible.sync="visible" :wrapperClosable="false"
           size="800px" append-to-body class="JNPF-common-drawer">
<div class="JNPF-flex-main">
<div class="dynamicForm dynamicDetail" >
<el-form ref="formRef" :model="dataForm" size="mini" label-width="100px" label-position="top" >
    <template v-if="!loading">
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="所属行业"  
 prop="industry"  >
                        <p>{{dataForm.industry}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="具体行业"  
 prop="specificIndustry"  >
                        <p>{{dataForm.specificIndustry}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="规上企业"  
 prop="enterpriseScaleRoute"  >
                        <p>{{dataForm.enterpriseScaleRoute}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="企业规模"  
 prop="enterpriseScale"  >
                        <p>{{dataForm.enterpriseScale}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="数字化转型自评测等级"  
 prop="digitalTransformationRating"  >
                        <p>{{dataForm.digitalTransformationRating}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="是否正在实施数字化转型"  
 prop="digitalTransformationConsultingServices"  >
                        <p>{{dataForm.digitalTransformationConsultingServices}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="已建成数字化项目类型"  
 prop="completedDigitalProjectsType"  >
                         <p>{{ dataForm.completedDigitalProjectsType }} </p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="已建成数字化项目类型其他"  
 prop="completedDigitalProjectsTypeOther"  >
                        <p>{{dataForm.completedDigitalProjectsTypeOther}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="希望开展数字化转型的环节"  
 prop="digitalTransformationPhase"  >
                         <p>{{ dataForm.digitalTransformationPhase }} </p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="希望开展数字化转型的环节其他"  
 prop="otherDigitalTransformationPhase"  >
                        <p>{{dataForm.otherDigitalTransformationPhase}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="2024-2025拟投入预算"  
 prop="digitalTransformationInvestmentBudget"  >
                        <p>{{dataForm.digitalTransformationInvestmentBudget}}</p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="希望的支持建议"  
 prop="supportAndAdviceFromServiceProviders"  >
                         <p>{{ dataForm.supportAndAdviceFromServiceProviders }} </p>
                </jnpf-form-tip-item>
            </el-col>
            <el-col :span="24"  >
                <jnpf-form-tip-item  label="其他"  
 prop="supportAndAdviceFromServiceProvidersOther"  >
                        <p>{{dataForm.supportAndAdviceFromServiceProvidersOther}}</p>
                </jnpf-form-tip-item>
            </el-col>
	    <el-col :span="24" >
		<jnpf-form-tip-item  label-width="0">
		<JnpfText 
 :textStyle='{"color":"#113AEF","font-weight":"bold","text-decoration":"none","font-size":16,"line-height":32,"font-style":"normal","text-align":"left"}' :closable= "false"  content ="服务商登录平台可查看需求详细信息及企业联系方式" >
		</JnpfText>
	</jnpf-form-tip-item>
	</el-col>
    </template>
</el-form>
    </div>
    <div class="drawer-footer">
        <el-button @click="visible = false"> 取 消</el-button>
    </div>
    </div>
    </el-drawer>
</template>
<script>
    import request from '@/utils/request'

    import { getConfigData } from '@/api/onlineDev/visualDev'
    import jnpf from '@/utils/jnpf'
    import Detail from '@/views/basic/dynamicModel/list/detail'
    import { thousandsFormat } from "@/components/Generator/utils/index"
    export default {
        components: { Detail},
        props: [],
        data() {
            return {
                visible: false,
                detailVisible: false,
                loading: false,

            dataForm: {
                id :'',
                            industry : '',
                            specificIndustry : '',
                            enterpriseScaleRoute : '',
                            enterpriseScale : '',
                            digitalTransformationRating : '',
                            digitalTransformationConsultingServices : '',
                            completedDigitalProjectsType : "",
                            completedDigitalProjectsTypeOther : '',
                            digitalTransformationPhase : "",
                            otherDigitalTransformationPhase : '',
                            digitalTransformationInvestmentBudget : '',
                            supportAndAdviceFromServiceProviders : "",
                            supportAndAdviceFromServiceProvidersOther : '',
                            passYnCity : '',
            },
                            completedDigitalProjectsTypeOptions:[{"fullName":"关键环节机器换人","id":"关键环节机器换人"},{"fullName":"平台+APPs场景改造","id":"平台+APPs场景改造"},{"fullName":"成套自动化（智能化）生产线","id":"成套自动化（智能化）生产线"},{"fullName":"基于标识的产品溯源、供应链协同等应用","id":"基于标识的产品溯源、供应链协同等应用"},{"fullName":"5G+工业互联网/AI等场景应用","id":"5G+工业互联网/AI等场景应用"},{"fullName":"车间级数字化改造","id":"车间级数字化改造"},{"fullName":"工厂级数字化改造","id":"工厂级数字化改造"},{"fullName":"特点环节/企业级/产业链级工业互联网平台","id":"特点环节/企业级/产业链级工业互联网平台"},{"fullName":"其他","id":"0"},{"fullName":"无","id":"无"}],
                        completedDigitalProjectsTypeProps:{"label":"fullName","value":"id"  },
                            digitalTransformationPhaseOptions:[{"fullName":"研发设计","id":"研发设计"},{"fullName":"生产制造","id":"生产制造"},{"fullName":"仓储物流","id":"仓储物流"},{"fullName":"市场营销","id":"市场营销"},{"fullName":"产品/服务","id":"产品/服务"},{"fullName":"供应链管理","id":"供应链管理"},{"fullName":"运营管理（人力、财务、资产管理等）","id":"运营管理（人力、财务、资产管理等）"},{"fullName":"其他","id":"0"}],
                        digitalTransformationPhaseProps:{"label":"fullName","value":"id"  },
                            supportAndAdviceFromServiceProvidersOptions:[{"fullName":"在服务过程中快速响应","id":"在服务过程中快速响应"},{"fullName":"提供性价比高的产品和服务","id":"提供性价比高的产品和服务"},{"fullName":"开展企业数字化改造培训","id":"开展企业数字化改造培训"},{"fullName":"开展企业精益生产培训","id":"开展企业精益生产培训"},{"fullName":"其他","id":"0"}],
                        supportAndAdviceFromServiceProvidersProps:{"label":"fullName","value":"id"  },

        }
        },
        computed: {},
        watch: {},
        created() {

        },
        mounted() {},
        methods: {
            toDetail(defaultValue, modelId) {
                if (!defaultValue) return
                getConfigData(modelId).then(res => {
                    if (!res.data || !res.data.formData) return
                    let formData = JSON.parse(res.data.formData)
                    formData.popupType = 'general'
                    this.detailVisible = true
                    this.$nextTick(() => {
                        this.$refs.Detail.init(formData, modelId, defaultValue)
                    })
                })
            },
            dataInfo(dataAll){
                let _dataAll =dataAll
                this.dataForm = _dataAll
            },

            init(id) {
                this.dataForm.id = id || 0;
                this.visible = true;
                this.$nextTick(() => {
                    if(this.dataForm.id){
                        this.loading = true
                        request({
                            url: '/api/example/Fz_company_baseinfo_main/detail/'+this.dataForm.id,
                            method: 'get'
                        }).then(res => {
                            this.dataInfo(res.data)
                            this.loading = false
                        })
                    }

                })
            },
        },
    }

</script>
